package org.pcorp.battlespace.modele.equipement;

import java.util.List;
import java.util.Map;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.pcorp.battlespace.modele.Capacite;
import org.pcorp.battlespace.modele.Coordonne;
import org.pcorp.battlespace.modele.Equipement;

@XmlRootElement(name = "armement")
@XmlType(propOrder = { "portee", "puissance", "degatX", "degatY", "encombrement" })
@XmlAccessorType(XmlAccessType.FIELD)
public class Armement extends Equipement {
	private long portee;
	private float puissance;
	private float degatX;
	private float degatY;
	private long encombrement;
	
	public Armement() {
		super();
	}
	
	public Armement(long id, String nom, Coordonne coord) {
		super(id, nom, coord);
	}



	public Armement(long id, String nom, String code, String description, long masse, long cout, String type, String ssType, List<Capacite> capacites, long operateurs, long portee, long puissance, long degatX, long degatY, long encombrement) {
		super(id, nom, code, description, masse, cout, type, ssType, capacites, operateurs);
		this.portee = portee;
		this.puissance = puissance;
		this.degatX = degatX;
		this.degatY = degatY;
		this.encombrement = encombrement;
	}

	public Armement(long id, String nom, String code) {
		super(id, nom, code);
	}

	public String getAbbrevPorte() {
		if (portee==1)
			return "C";
		if (portee==2)
			return "M";
		if (portee==3)
			return "L";
		return "E";
	}

	public Armement(long id, String nom) {
		super(id, nom);
	}

	public long getPortee() {
		return portee;
	}
	public void setPortee(long portee) {
		this.portee = portee;
	}
	public float getPuissance() {
		return puissance;
	}
	public void setPuissance(float puissance) {
		this.puissance = puissance;
	}

	public float getDegatX() {
		return degatX;
	}

	public void setDegatX(float degatX) {
		this.degatX = degatX;
	}

	public float getDegatY() {
		return degatY;
	}

	public void setDegatY(float degatY) {
		this.degatY = degatY;
	}

	public long getEncombrement() {
		return encombrement;
	}

	public void setEncombrement(long encombrement) {
		this.encombrement = encombrement;
	}
	
	
}
